//
// Created by liushuai on 18-10-29.
//

#ifndef EX23_ARRAY_H
#define EX23_ARRAY_H

#include <iostream>
using namespace std;
template <typename T,int KSize,int KVal>
class Array {
private:
    T* pArr;
public:
    Array();
    ~Array()
    {
        delete [] pArr;
        pArr = nullptr;
    }
    void display();

};
template <typename T,int KSize,int KVal>
Array<T,KSize,KVal>::Array() {
    pArr = new T[KSize];
    for(int i=0;i<KSize;i++)
        pArr[i] = KVal;
}
template <typename T,int KSize,int KVal>
void Array<T,KSize,KVal>::display() {
    for(int i=0;i<KSize;i++)
        cout<<KVal<<"\n";
}

#endif //EX23_ARRAY_H
